
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div id="page">
        
            <div id='header'>
            <a href="index.html">
            <img style="border:none" alt="Redis Documentation" src="redis.png">
            </a>
            </div>
        
            <div id="pagecontent">
                <div class="index">
<!-- This is a (PRE) block.  Make sure it's left aligned or your toc title will be off. -->
<b>BrpoplpushCommand: Contents</b><br>&nbsp;&nbsp;<a href="#BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;">BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
                </div>
                
                <h1 class="wikiname">BrpoplpushCommand</h1>

                <div class="summary">
                    
                </div>

                <div class="narrow">
                    
<h1><a name="BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;">BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;</a></h1> 2.1.8) =
<i>Time complexity: O(1)</i><blockquote>Blocking version of the <a href="RpoplpushCommand.html">RPOPLPUSH</a> command. Atomically removes and returnsthe last element (tail) of the source list at <i>srckey</i>, and as a side effect pushes the returned element in the head of the list at <i>dstkey</i>.</blockquote>
If the source list is empty, the client blocks until another client pushes against the source list. Of course in such a case the push operation against the destination list will be performed after the command unblocks detecting a push against the source list.<br/><br/>Note that the command returns an error if the target key already exists but is not a list. The error is delayed at the time the push operation is attempted, that is, immediately if the source list is not empty, or when the first push against the source list happens in the case the command would block.<br/><br/>The timeout value can be 0 or a positive integer value. When it is zero the command will block forever, until something is pushed against <i>srckey</i>. Otherwise the command will wait the specified number of seconds at max, returning an nil value when the timeout expires.<br/><br/>The source and destination of the list can be the same, having the effect of rotating the list. Please check <a href="RpoplpushCommand.html">RPOPLPUSH</a> for more information.<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>
                </div>
        
            </div>
        </div>
    </body>
</html>

